package com.ayoka;

import android.graphics.Color;

import com.ayoka.base.AppContext;
import com.jcp.baselibrary.utils.FileUtil;

import java.io.File;

/**
 * Created by wayne on 2017/11/28.
 */

public class Constant {

    public static final String CourseVideoDirectory = AppContext.getAppCacheDir() + File.separator + "course";

    /**
     * sharedprefence存值
     */
    // app版本号
    public static final String APP_LOCAL_VERSION = "APP_LOCAL_VERSION";
    // 微信登录授权open_id
    public static final String WX_OPEN_ID = "WX_OPEN_ID";
    // 展示课程滑动
    public static final String SHOW_DRAG = "SHOW_DRAG";

    public static final String WECHAT_LOGIN_SUCCESS = "WECHAT_LOGIN_SUCCESS";
    public static final String WECHAT_LOGIN_FILED = "WECHAT_LOGIN_FILED";
    public static final String WECHAT_LOGIN_CANCEL = "WECHAT_LOGIN_CANCEL";

    public static final String PAY_SUCCESS = "pay_success";
    public static final String PAY_FAILURE = "pay_failure";
    public static final String PAY_CANCEL = "pay_cancel";

    //替换为申请到的app id
    public static final String WX_APP_ID = "wxeb21c88153d67f38";
    public static final String WX_PARENT_APP_KEY = "8a6578e0c29611e78fea00163e001f0c"; // KEY是商户秘钥


    public static final int WX_ERROR_CODE = 300;
    public static final int WX_ERROR_TOKEN = 403;
    // 腾讯bugly
    public static final String TENCENT_BUGLY_APPID = "680163b169";

    // api服务器
    public static String getBaseApiUrl() {
        if (BuildConfig.DEBUG) {
            // 测试服务器
            return "https://api.card.headin.cn/ayoka-parenting-api-v4/";
        }
        // 正式服务器
        return "https://api.ayoka.cn/ayoka-parenting-api-v4/";
    }

    public static final int[][] colorList = new int[][]{
            {Color.parseColor("#7a3cf9"), Color.parseColor("#7077e2")},// 紫色
            {Color.parseColor("#6ebf08"), Color.parseColor("#b6ff45")},// 绿色
            {Color.parseColor("#e8514a"), Color.parseColor("#ff9188")},// 红色
            {Color.parseColor("#5182fc"), Color.parseColor("#71d4ff")},// 蓝色
            {Color.parseColor("#ff9500"), Color.parseColor("#ffb730")},// 橙色
            {Color.parseColor("#07c2a3"), Color.parseColor("#52f8c8")},// 浅绿色
    };
    // 下次是否显示
    public static final String NEXT_NOT_SHOW = "NEXT_NOT_SHOW";
    // 课程反馈按钮
    public static final String SWITCH_BUTTON = "SWITCH_BUTTON";

    // 权限请求
    public static final int BASIC_PERMISSION_REQUEST_CODE = 0x1111;
    public static final int REQUEST_OVERLAY_CODE =  0x2222;



    public static int CircleOwner = 1;
    public static int TopicOwner = 2;

    public static String FounderUid = "FounderUid";
    public static String FLOAT_SWITCH = "FLOAT_SWITCH";

    public static String SERVICE_AGREEMENT_URL = "https://cdn.ayoka.cn/protocal.html";
    public static String QUIT_AI_MILLS = "QUIT_AI_MILLS";

    public static class CourseType {
        // 1必修 0选修 2已购买 3推荐
        public static int TYPE_OPTIONAL = 0;
        public static int TYPE_REQUIRED = 1;

        public static int TYPE_PURCHASED = 2;
        public static int TYPE_RECOMMEND = 3;
    }

    public static class EmergencyOptionalType {
        // 1游戏 2量表 3十问
        public static final int TYPE_GAMEL = 1;
        public static final int TYPE_MEASURE = 2;
        public static final int TYPE_TEN_QUESTION = 3;
        public static final int TYPE_PARENTING = 4;
    }

    public class MeasureReportType {
        public static final int TYPE_PROGRESS_PIE = 0;
        public static final int TYPE_RADAR = 1;
        public static final int TYPE_TRIANGLE = 2;
    }

    public  class CourseCompletedStatus{
        public static final int DISABLE = -1; // 未开启
        public static final int PROCRESSING = 0; // 进行中
        public static final int COURSE_FINISHED = 1; // 课程完成  作业尚未完成
        public static final int COURSE_COMPLETED = 2; // 课程、作业、冥想均完成
    }

    public static class CircleSubscribe {
        public static int UNSUBSCRIBED = -1;
        public static int WAIT_CONFIRM = 0;
        public static int SUBSCRIBED = 1;
    }

    public static class TrainingType {
        public static int BASIC = 1;
        public static int ADVANCED = 2;
    }

    public static class OpenMember {
        public static int  OPEN_MEMBER = 1;
        public static int  CHECK_RIGHT = 2;
        public static int  CONTINUATION = 3;
    }
}